import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import test from '@/components/test'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/web-html',
    name: 'WebHTML',
    component: () => import(/* webpackChunkName: "about" */ '@/views/Html.vue'),
    children: [
      {
        path: '9-13',
        component: test
      }
    ]
  },
  {
    path: '/web-css',
    name: 'WebCSS',
    component: () => import(/* webpackChunkName: "about" */ '../views/CSS.vue')
  },
  {
    path: '/web-js',
    name: 'WebJavaScript',
    component: () => import(/* webpackChunkName: "about" */ '../views/JS.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
